<div class="docs">
  <h1>
    Document info:
  </h1>  
  <div id="document_info">
    <?php if (!empty($document)): ?>
        <table cellspacing="3" border="true">
          <tbody>
            <tr>
              <th>
                Document Name:
              </th>
              <td class="name">
                <?php echo $document->getName(); ?>
              </td>
            </tr>
            <tr>
              <th>
                Category:
              </th>
              <td class="category">
                <?php echo $document->getCategory(); ?>
              </td>
            </tr>
            <tr>
              <th>
                Description:
              </th>
              <td class="description">
                <?php echo $document->getDescription(); ?>
              </td>
            </tr>  
            <tr>
              <th>
                Creator:
              </th>
              <td class="creator">
                <?php echo $documentCreatorFullName; ?>
              </td>
            </tr>   
            <tr>
              <th>
                Modifier:
              </th>
              <td class="modifier">
                <?php echo $documentUpdatorFullName; ?>
              </td>
            </tr>   
            <tr>
              <th>
                Created at:
              </th>
              <td class="created_at">
                <?php echo $document->getCreated_at(); ?>
              </td>
            </tr>                              
            <tr>
              <th>
                Updated at:
              </th>
              <td class="updated_at">
                <?php echo $document->getUpdated_at(); ?>
              </td>
            </tr>                       
            <tr>
              <th>
                Is deleted:
              </th>
              <td class="is_deleted">
                <?php echo $document->getIsDeletedString(); ?>
              </td>
            </tr>                       
            <tr>
              <th>
                Version:
              </th>
              <td class="version">
                <a href="<?php echo url_for('document_versions', $document) ?>">Versions</a>
              </td>
            </tr>
            <tr>
              <th>
                Files:
              </th>
              <td class="file">
                 <a href="<?php echo url_for('doc_files', $document) ?>">View files</a>
              </td>
            </tr>
          </tbody>
        </table>

        <?php if ($show_document): ?>
           <a href="<?php echo url_for('document_edit', $document) ?>"><img src="/images/editb.png"/></a>

            <?php echo link_to('<img src="/images/delb.png"/>',
                      'document/delete?id='.$document->getId(),
                      array('method' => 'delete', 'confirm' => 'Are you sure?')) ?>
        <?php endif;?>
    <?php endif;?>
  </div>
</div>